<?php
	
	//ini_set('display_errors','On');
	header("Pragma: no-cache");

$ua = strtolower($_SERVER['HTTP_USER_AGENT']);

$uachar = "/(symbianos|android|Mac OS|ucweb|blackberry)/i";

if($ua != '' && preg_match($uachar, $ua)){

echo '<script>window.location.href="http://www.chinawalking.net.cn/sj/personal.php";</script>';

exit();

}
	header("Content-Type: text/html;charset=utf-8");
	include("function/_nosql.php"); //
	include("function/function.php");
	include("_include.user.judge.php");
	if(date('Y-m-d H:i:s') >= getClassName('kboy_user','user_vipetime','uid='.$_SESSION['kboy_userid']) ){
	 mysql_query("update kboy_user  set user_style=0   where uid=".$_SESSION['kboy_userid']);
	}
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心</title>
<link rel="stylesheet" href="css/common.css"/>
<link rel="stylesheet" href="css/sq.css"/>
<script type="text/javascript" src="js/baidutongji.js"></script>
<script type="text/javascript" src="js/laydate/laydate.js"></script>
</head>
<body>
    <!--top-bar begin-->
	<? include("_include.top.topbar.php") ?>
    <!--top-bar end-->
    <!--banner begin-->
    <? include("_include.user.topbar.php")?>
    
    <!--banner end-->
    <!--member center-->
    <div class="ban-11">
        <p><a href="javascript:;" class="ban-11-a">余额：<span>0.00</span>元</a><a href="javascript:;" class="chongzhi">充值</a></p>
    </div>
    <div class="ban-form" >
        <p>注意事项：充值成功将无法退还！</p>
        <h4>充值金额</h4>
        <a href="./native.php?WIDout_trade_no=050020161031210938379934u<?php echo $_SESSION['kboy_userid'];?>">充值500元送75元</a> 
        <a href="./native.php?WIDout_trade_no=050120161031210938379934u<?php echo $_SESSION['kboy_userid'];?>">充值1000元送150元</a>
        <a href="./native.php?WIDout_trade_no=050220161031210938379934u<?php echo $_SESSION['kboy_userid'];?>">充值3000元送600元</a>
    </div>
    <div class="member-box">
        <div class="content">
			<? include("_include.user.leftnav.php") ?>
            <div class="member-box-r">
                <div class="member-item1">
                    <div class="m-title">会员中心</div>
                    <div class="m-search">
                        <input type="text" class="search-text input_wby" value="输入订单编号">
                        <input type="submit" class="search-send" value="搜 索">
                    </div>
                </div>
                <div class="member-basic">
                    <div class="basic-info-h">
                    	<?php if(getClassName('kboy_user','user_style','uid='.$_SESSION['kboy_userid']) == 1){ ?>
                    	<ul style="width: 300px;float: right;">
                        	<li>
                                <span class="s-l">参加次数 :</span>
                                <p><?php 
                                	if($hd_leiji = getClassName("kboy_jiangli","hd_leiji","uid='$user_uid'")){
                                		echo $hd_leiji;
                                	}else{
                                	echo 0;
                                	}
                                	?> 次</p>
                            </li>
                            <li>
                                <span class="s-l">短线次数 :</span>
                                <p><?php 
                                	if($hdduanxian = getClassName("kboy_jiangli","hdduanxian","uid='$user_uid'")){
                                		echo $hdduanxian;
                                	}else{
                                	echo 0;
                                	}
                                	?> 次</p>
                            </li>
                            <li>
                                <span class="s-l">长线次数 :</span>
                                <p><?php 
                                	if($hdchangxian = getClassName("kboy_jiangli","hdchangxian","uid='$user_uid'")){
                                		echo $hdchangxian;
                                	}else{
                                	echo 0;
                                	}
                                	?> 次</p>
                            </li>
                            <li>
                                <span class="s-l">国际次数 : </span>
                                <p><?php 
                                	if($hdguoji = getClassName("kboy_jiangli","hdguoji","uid='$user_uid'")){
                                		echo $hdguoji;
                                	}else{
                                	echo 0;
                                	}
                                	?> 次</p>
                            </li>
                            <li>
                                <span class="s-l">上次活动 : </span>
                                <p><?php echo $user_lasthd;?></p>
                            </li>
                            <li>
                                <span class="s-l">活动金额 :</span>
                                <p><?php 
                                	if($hd_zong_jine = getClassName("kboy_jiangli","hd_zong_jine","uid='$user_uid'")){
                                		echo $hd_zong_jine;
                                	}else{
                                	echo 0;
                                	}
                                	?> 元</p>
                            </li>
                            <li>
                                <span class="s-l">优惠金额 :</span>
								<p><?php 
									if($hdyouhui = getClassName("kboy_jiangli","hdyouhui","uid='$user_uid'")){
                                		echo $hdyouhui;
                                	}else{
                                	echo 0;
                                	}
									?> 元</p>
                            </li>
                            <li>
                                <span class="s-l">国际金额 :</span>
                                <p><?php
                                	 if($hdguoji_jine = getClassName("kboy_jiangli","hdguoji_jine","uid='$user_uid'")){
                                		echo $hdguoji_jine;
                                	}else{
                                	echo 0;
                                	}
                                	 ?> 元</p>
                            </li>
                            <li>
                                <span class="s-l">获奖统计 :</span>
                                <p><?php 
                                	$sql = "select count(*) as count from kboy_jljilu where jl_ztai=1 and uid = $user_uid";
                                	$num = mysql_query($sql);
                                	$cishu = mysql_fetch_assoc($num);
                                	echo $cishu['count'];
                                	?> 次</p>
                            </li>
                        </ul>
                        <?php } ?>
                        <ul <?php if(getClassName('kboy_user','user_style','uid='.$_SESSION['kboy_userid']) != 1){ ?>style="width: 100%;"<?php } ?>>
                        	<li>
                                <span class="s-l">推介ID :</span>
                                <p><?=$user_uid?></p>
                            </li>
                            <li>
                                <span class="s-l">昵称 :</span>
                                <p><? if($user_nickname){ echo $user_nickname;}else{ echo "暂未设置";}?><a href="user_basics.php" class="revise">修改</a></p>
                            </li>
                            <li>
                                <span class="s-l">Email :</span>
                                <p><?=$user_email?>
                                	<?php if($user_email == ""){ ?>
                                	<a href="user_addemail.php" class="revise">绑定邮箱</a>
                                	<?php }else{ ?>
                                	<a href="user_editemail.php" class="revise">修改</a>
                                	<?php } ?>
                                </p>
                            </li>
                            <li>
                                <span class="s-l">手机 : </span>
                                <p><? if($user_phone){ echo $user_phone;}else{ echo "暂未绑定";}?><a href="user_editphone.php" class="revise"><? if($user_phone){ echo '修改';}else{ echo "绑定";}?></a></p>
                            </li>
                            <li>
                                <span class="s-l">推介人 : </span>
                                <p><?php if($user_pid != 0){echo getClassName("kboy_user","user_nickname","uid='$user_pid'");}?>
                                	<?php if($user_pid == 0){?>
                                	<a href="user_pidadd.php" class="revise">添加推介人</a>
                                	<?php } ?>
                                </p>
                            </li>
                            <li>
                                <span class="s-l">会员类型 :</span>
                                <p class="mr-80">
								<?php
										if(getClassName('kboy_user','user_style','uid='.$_SESSION['kboy_userid']) == 0){
											echo "<i class=\"member-icon icon-common\"></i>普通会员</p>";
											echo "<span>可升级为：</span>";
											echo "<div class=\"mr\">";
											echo "<div class=\"mr-30 member-revise\">";
											echo "<i class=\"member-icon icon-cva\"></i>CVA会员";
											echo "<a href=\"alipay/alipayapi.php?WIDout_trade_no=".date('YmdHis')."_".$_SESSION['kboy_userid']."\" class=\"revise\">升级</a>";
											echo "<div class=\"revise-tips\">";
											echo "<p>充值50元即可成为CVA会员，即可享受活动折扣优惠！</p>";
											echo "<span class=\"s-tips\"></span>";
											echo "</div>";
											echo "</div>";
											echo "</div>";
										}elseif(getClassName('kboy_user','user_style','uid='.$_SESSION['kboy_userid']) == 1){
											echo "<i class=\"member-icon icon-cva\"></i>CVA会员</p>";
										}else{
											echo "参数错误";
										}
								  ?>
                            </li>
                            <li>
                                <span class="s-l">会员时间 :</span>
								<?php
										if($user_style == 0){
											echo "<p>永久</p>";
										}else{
											echo "<p>".$user_vipstime."  至  ".$user_vipetime."<a href=\"#\" class=\"revise\">续费</a></p>";
										}
								?>
                            </li>
                            <li>
                                <span class="s-l">IP地址 :</span>
                                <p><?=$user_lastip?></p>
                            </li>
                            <li>
                                <span class="s-l">上次登录 :</span>
                                <p><?=$user_lasttime?></p>
                            </li>
                        </ul>
                    </div>
                    <div class="member-info-d">
                        <ul>
                            <li><a href="forum_travel.php?uid=<?=$kboy_userid?>"><span>我的游记 : </span></a><span><a href="forum_travel.php?uid=<?=$kboy_userid?>"><?=getNewsNums("kboy_forum_travel","uid=$kboy_userid")?></a>个</span><a href="forum_travel_add.php?uid=<?=$kboy_userid?>">写游记</a></li>
                            <li><a href="forum_photo.php?uid=<?=$kboy_userid?>"><span>我的相册 : </span></a><span><a href="forum_photo.php?uid=<?=$kboy_userid?>"><?=getNewsNums("kboy_forum_album","uid=$kboy_userid")?></a>个</span><a href="forum_photo_albumadd.php?uid=<?=$kboy_userid?>">创建相册</a></li>
                            <li><a href="forum_photo.php?uid=<?=$kboy_userid?>"><span>我的照片 : </span></a><span><a href="forum_photo.php?uid=<?=$kboy_userid?>"><?=getNewsNums("kboy_forum_pic","uid=$kboy_userid")?></a>个</span><a href="forum_photo_albumadd.php?uid=<?=$kboy_userid?>">上传照片</a></li>
                            <li><a href="forum_active.php?uid=<?=$kboy_userid?>"><span>我的活动 : </span></a><span><a href="forum_active.php?uid=<?=$kboy_userid?>"><?php echo getNewsNums('kboy_forum_active'," uid=$kboy_userid and active_model=0 and active_state=0");?></a>个</span><a href="forum_active.php?uid=<?=$kboy_userid?>">查看</a></li>
                            <li><a href="forum_map.php?uid=<?=$kboy_userid?>"><span>我的足迹 : </span></a><span><a href="forum_map.php?uid=<?=$kboy_userid?>"><?=getNewsNums("kboy_forum_map","uid=$kboy_userid")?></a>个</span><a href="forum_map.php?uid=<?=$kboy_userid?>">查看</a></li>
                            <li><a href="forum_friend.php?uid=<?=$kboy_userid?>"><span>我的好友 : </span></a><span><a href="forum_friend.php?uid=<?=$kboy_userid?>">0</a>个</span><a href="forum_friend.php?uid=<?=$kboy_userid?>">查看</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--member center-->
    <!--foot begin-->
	<? include("_include.bottom.footbar.php") ?>
    <!--foot begin-->
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
    <script type="text/javascript" src="js/sq.js"></script>
</body>
</html>
<script>
 $(".chongzhi").click(function(){
     $(".ban-form").toggle();
 })

</script>

